package com.yiwei.hdb.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.yiwei.hdb.R;
import com.yiwei.hdb.adapter.base.ItemAdapter;
import com.yiwei.hdb.model.MoneyRecordModel;
import com.yiwei.hdb.model.MoneyRewardModel;
import com.yiwei.hdb.model.ShareRecordModel;
import com.yiwei.hdb.util.DateTime;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2016/10/17 0017.
 */

public class InviteRecordV2Adapter extends ItemAdapter<MoneyRecordModel.DataBean.ListsBean, InviteRecordV2Adapter.InviteRecordViewHolder> {


    public InviteRecordV2Adapter(Context context) {
        super(context);
    }

    @Override
    public InviteRecordViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return new InviteRecordViewHolder(inflate(R.layout.item_invite_record_v2, parent));
    }

    @Override
    public void onBindViewHolder(InviteRecordViewHolder holder, int position) {
        MoneyRecordModel.DataBean.ListsBean item = getItem(position);
        holder.txtLeft.setText(item.real_name);
        holder.txtRight.setText(item.status_text);

        holder.txtCenter.setText(item.reward + "元");
    }


    class InviteRecordViewHolder extends RecyclerView.ViewHolder {

        @BindView(R.id.txt_left)
        TextView txtLeft;
        @BindView(R.id.txt_right)
        TextView txtRight;
        @BindView(R.id.layout_total)
        LinearLayout layoutTotal;
        @BindView(R.id.txt_center)
        TextView txtCenter;


        public void bindData() {

        }

        private InviteRecordViewHolder(View itemView) {
            super(itemView);
            ButterKnife.bind(this, itemView);
        }


    }
}
